﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/OpenDelib.Master" CodeBehind="FicheAssemblee.aspx.vb" Inherits="OpenDelib.FicheAssemblee" %>
<%@ Register TagPrefix="asp" Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" %>
<%@ Register TagPrefix="cc1" Namespace="Odyssee.WebControles" Assembly="Odyssee.WebControles" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .datebox {
            width: 72px;
        }
        .timebox {
            width: 38px;
        }
    </style>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="toolbar" runat="server">   
    <hr/>
    <cc1:ToolBar ID="tbDossier" runat="server" CssClass="toolbar">
        <items>
            <cc1:ToolBarTextImageButton ID="btnActualiser" runat="server" Text="Actualiser" ImageWidth="20" ImageHorizontalOffset="4" ImageUrl="~/Images/refresh_white_20.png" />
            <cc1:ToolBarSeparator ID="tbSep1" runat="server" Offset="2" />
            <cc1:ToolBarTextImageButton ID="btnEnregister" runat="server" Text="Enregistrer" ImageWidth="20" ImageHorizontalOffset="4" ImageUrl="~/Images/save_white_20.png" />
            <cc1:ToolBarSeparator ID="tbSep2" runat="server" Offset="2" />
            <cc1:ToolBarTextImageMenuButton ID="btnTraitements" runat="server" Text="Traitements" ImageWidth="20" ImageHorizontalOffset="4" ImageUrl="~/Images/filter_settings_white_20.png">
                <Items>
                </Items>
            </cc1:ToolBarTextImageMenuButton>
        </items>
    </cc1:ToolBar> 
    <hr/>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="content" runat="server">
    <cc1:JQPopupPanel ID="pnlAssemblee" runat="server" PopupHeight="540" PopupWidth="700" Style="display: none;" Close="True" />

    <div id="divDossier" class="bloc">
        <div class="divTitle">
            <asp:Label runat="server" Text="Assemblée" CssClass="labelDivTitle" />
        </div>

        <%--OBJET--%>
        <div class="divMiniTitle">
            <asp:Label runat="server" Text="Objet" CssClass="label" />
        </div>
        <asp:TextBox ID="txtObjet" runat="server" TextMode="SingleLine" CssClass="textbox" Style="width:calc(100% - 6px);" MaxLength="40" />
        
        <%--RESUME--%>
        <div class="divMiniTitle">
            <asp:Label runat="server" Text="Résumé" CssClass="label" />
        </div>
        <asp:TextBox ID="txtResume" runat="server" TextMode="MultiLine" CssClass="textbox" Height="100px" Style="width:calc(100% - 6px);" />
        
        <%--ETAT--%>
        <div class="divMiniTitle">
            <asp:Label runat="server" Text="Etat de l'assemblée" CssClass="label" />
        </div>
        <asp:DropDownList ID="cmbEtat" runat="server" CssClass="combo" Style="width: 100%; border: none;" />

        <%--LIEU--%>
        <div class="divMiniTitle">
            <asp:Label runat="server" Text="Lieu de l'assemblée" CssClass="label" />
        </div>
        <asp:DropDownList ID="cmbLieu" runat="server" CssClass="combo" Style="width: 100%; border: none;" />

        <%--DATE ET NUMERO--%>
        <div style="width:100%; display:flex;">
            <div class="divMiniTitle" style="width:108px; border-right: 1px solid black;">
                <asp:Label runat="server" Text="Date" CssClass="label" />
            </div>
            <div class="divMiniTitle" style="width:44px;">
                <asp:Label runat="server" Text="Heure" CssClass="label" />
            </div>
            <div class="divMiniTitle" style="width:calc(100% - 152px); border-left: 1px solid black;">
                <asp:Label runat="server" Text="Numéro" CssClass="label" />
            </div>
        </div>
        <div style="width:100%; display:flex;">
            <div style="width:108px; border-right: 1px solid black; background-color:white;">
                <cc1:AcroDateBox id="dteDateAssemblee" runat="server" CssClass="textbox datebox" />
            </div>
            <div style="width:44px; background-color:white;">
                <cc1:AcroTimeBox id="tmeHeure" runat="server" CssClass="textbox timebox" />
            </div>
            <div style="width:calc(100% - 152px); border-left: 1px solid black;">
                <asp:TextBox ID="txtCode" runat="server" CssClass="textbox" Style="width:calc(100% - 6px);" Enabled="false" />
            </div>
        </div>
               

    </div>

    <%--DIV ELUS--%>
    <div id="divElus" runat="server" class="bloc">
        <div class="divTitle">
            <asp:Label runat="server" Text="Elus participants" CssClass="labelDivTitle" />
        </div>
        <cc1:AcroGridView ID="gvElus" runat="server" AutoGenerateColumns="false" CssClass="grid" AllowPaging="true" PageSize="12" PagerStyle-CssClass="gridpager" AllowSorting="false" EmptyDataText="Aucun élu" EmptyDataRowStyle-HorizontalAlign="Center" ShowHeaderWhenEmpty="True">
            <Columns>
                <asp:TemplateField HeaderText="" SortExpression="" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Wrap="false">
                    <ItemTemplate><asp:CheckBox ID="chkLie" runat="server" Checked='<%#Eval("Lie")%>' Text='<%#Eval("Cle")%>' CssClass="hiddenCheckBox" AutoPostBack="true" OnCheckedChanged="chkEluLie_CheckedChanged" /></ItemTemplate>
                </asp:TemplateField>
                <cc1:BoundField DataField="Cle" ReadOnly="True" SortExpression="Cle" HeaderText="N°" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Wrap="false" />
                <cc1:BoundField DataField="Qualite" ReadOnly="True" SortExpression="Qualite" HeaderText="Qualité" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Wrap="false" />
                <cc1:BoundField DataField="Nom" ReadOnly="True" SortExpression="Nom" HeaderText="Nom" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Wrap="false" />
                <cc1:BoundField DataField="Prenom" ReadOnly="True" SortExpression="Prenom" HeaderText="Prénom" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Wrap="false" />
            </Columns>
        </cc1:AcroGridView>
    </div>
    
    <%--DIV COMMISSIONS--%>
    <div id="divCommissions" runat="server" class="bloc">
        <div class="divTitle">
            <asp:Label runat="server" Text="Commissions" CssClass="labelDivTitle" />
        </div>
        <cc1:AcroGridView ID="gvCommissions" runat="server" AutoGenerateColumns="false" CssClass="grid" AllowPaging="true" PageSize="10" PagerStyle-CssClass="gridpager" AllowSorting="false" EmptyDataText="Aucune commission" EmptyDataRowStyle-HorizontalAlign="Center" ShowHeaderWhenEmpty="True">
            <Columns>
                <asp:TemplateField HeaderText="" SortExpression="" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Wrap="false">
                    <ItemTemplate><asp:CheckBox ID="chkLie" runat="server" Checked='<%#CType(Eval("AssembleesLiees"), List(Of String)).Contains(Me.txtCode.Text)%>' Text='<%#Eval("CodeDossier")%>' CssClass="hiddenCheckBox" AutoPostBack="true" OnCheckedChanged="chkCommissionLiee_CheckedChanged" /></ItemTemplate>
                </asp:TemplateField>
                <cc1:BoundField DataField="CodeDossier" ReadOnly="True" SortExpression="CodeDossier" HeaderText="Code" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Wrap="false" />
                <cc1:BoundField DataField="Identificateur" ReadOnly="True" SortExpression="Identificateur" HeaderText="Identificateur" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Wrap="false" />
                <cc1:BoundField DataField="NombreMembres" ReadOnly="True" SortExpression="NombreMembres" HeaderText="Membres" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Wrap="false" />
                <cc1:BoundField DataField="NombreRapports" ReadOnly="True" SortExpression="NombreRapports" HeaderText="Rapports" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Wrap="false" />
            </Columns>
        </cc1:AcroGridView>
    </div>
    
    <%--DIV RAPPORTS--%>
    <div id="divRapports" runat="server" class="bloc">
        <div class="divTitle">
            <asp:Label runat="server" Text="Rapports proposés" CssClass="labelDivTitle" />
        </div>
        <cc1:AcroGridView ID="gvRapports" runat="server" AutoGenerateColumns="false" CssClass="grid" AllowPaging="true" PageSize="10" PagerStyle-CssClass="gridpager" AllowSorting="false" EmptyDataText="Aucun rapport" EmptyDataRowStyle-HorizontalAlign="Center" ShowHeaderWhenEmpty="True">
            <Columns>
                <asp:TemplateField HeaderText="" SortExpression="" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Wrap="false">
                    <ItemTemplate><asp:CheckBox ID="chkLie" runat="server" Checked='<%#(Eval("AssembleeLiee") IsNot Nothing AndAlso CStr(Eval("AssembleeLiee")).ToLower = Me.txtCode.Text.ToLower)%>' Text='<%#Eval("CodeDossier")%>' CssClass="hiddenCheckBox" AutoPostBack="true" OnCheckedChanged="chkRapportLie_CheckedChanged" /></ItemTemplate>
                </asp:TemplateField>
                <cc1:BoundField DataField="CodeDossier" ReadOnly="True" SortExpression="CodeDossier" HeaderText="Code" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Wrap="false" />
                <cc1:BoundField DataField="Identificateur" ReadOnly="True" SortExpression="Identificateur" HeaderText="Identificateur" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Wrap="false" />
                <cc1:BoundField DataField="Etat" ReadOnly="True" SortExpression="Etat" HeaderText="Etat" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Wrap="false" />
                <cc1:BoundField DataField="ListeActuelle" ReadOnly="True" SortExpression="ListeActuelle" HeaderText="Liste actuelle" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Wrap="false" />
                <cc1:BoundField DataField="ListeSuivante" ReadOnly="True" SortExpression="ListeSuivante" HeaderText="Liste suivante" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Wrap="false" />
            </Columns>
        </cc1:AcroGridView>
    </div>

</asp:Content>
